package com.zy.datareceiver.binsess.rabbit.entity;


import com.zy.datareceiver.core.cast.ConCast;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

/**所有存储数据的队列*/
public class ReceiveDataStorage {

    private ReceiveDataStorage(){}

    private enum Singleton{
        INSTANCE;
        private ReceiveDataStorage receiveData;
        Singleton(){
            receiveData = new ReceiveDataStorage();
        }
    }
    public static ReceiveDataStorage getInstance(){
        return Singleton.INSTANCE.receiveData;
    }


    // 此队列存放要往前段推送的数据
//    private static final BlockingQueue<String> socketQueue = new LinkedBlockingDeque<String>(ConCast..DEFAULT_PUSH_TO_SOCKET_SIZE);
    public BlockingQueue<DataGram> receiveQueue = new LinkedBlockingDeque<DataGram>(ConCast.QueueSize.RABBITMQ_RECEIVE_MSG_QUEUE_SIZE);

    public BlockingQueue<PassagewayDomain> statusQueue = new LinkedBlockingDeque<PassagewayDomain>(ConCast.QueueSize.RABBITMQ_RECEIVE_STATUS_QUEUE_SIZE);

}
